package com.util.net

class FileGroovy {
	
	static main(args) {
		printDir("D:\\U",".jpg")
		sleep(10000);
		println 'ok';
	}
	def static printDir(dirName,fileType) {
		def dir = new File(dirName)
		if (dir.isDirectory()) {
			dir.eachFileRecurse { 
				String a = it ; 
				if(a.endsWith(fileType)){
					println a;
				}
			}
		}
	}
}